home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / CUGUK / COMMS / C100.ZIP / KERMIT.ZIP / CKUKER.MAK < prev    next >
Text File  |  1990-01-31  |  14KB  |  363 lines

  1. # CKUKER.MAK, Version 2.11, 29 January 1988
  2. #
  3. # -- Makefile to build C-Kermit for Unix and Unix-like systems --
  4. #
  5. # Before proceeding, read the instructions below, and also read the file
  6. # ckuker.bwr (the "beware file"), and then rename this file to "makefile"
  7. # or "Makefile", and then:
  8. #
  9. # for Amdahl UTS 2.4 on IBM 370 series & compatible mainframes, "make uts24"
  10. # for Amdahl UTSV IBM 370 series & compatible mainframes, "make sys3"
  11. # for AT&T 3Bx systems, "make att3bx"
  12. # for AT&T 7300 Unix PC, "make att7300" (accesses built-in dialer)
  13. # for AT&T generic System III/System V, "make sys3" or "make sys3nid"
  14. # for ATT System V R3, use "make sys5r3".  This is different from the above.
  15. # for BBN C/70 with IOS 2.0, "make c70"
  16. # for Bell Unix Version 7 (aka 7th Edition), "make v7" (but see below)
  17. # for Berkeley Unix 4.x, "make bsd" (tested with 4.1, 4.2, and 4.3)
  18. # for Berkeley Unix 2.9 (DEC PDP-11 or Pro-3xx), "make bsd29"
  19. # for CDC VX/VE 5.2.1 Sys V emulation, "make vxve"
  20. # for CIE Systems 680/20 with Regulus, "make cie"
  21. # for DEC Ultrix 1.1 or 1.2, "make bsd"
  22. # for DEC Pro-350 with Pro/Venix V1.x, "make provx1"
  23. # for DEC Pro-350 with Pro/Venix V2.0 (Sys V), "make sys3nid"
  24. # for DEC Pro-380 with Pro/Venix V2.0 (Sys V), "make sys3" or "make sys3nid"
  25. # for Fortune 32:16, For:Pro 1.8, "make ft18"
  26. # for HP-9000 Series with HP-UX, "make hpux"
  27. # for IBM 370 Series with IX/370, "make ix370"
  28. # for Interactive System III (PC/IX) on PC/XT, "make pcix"
  29. # for Interactive Sys III on other systems, "make is3"
  30. # for Masscomp variation on Sys III, "make rtu"
  31. # for Microsoft,IBM Xenix (/286, PC/AT, etc), "make xenix" (but see below)
  32. # for NCR Tower 1632, OS 1.02, "make tower1"
  33. # for NCR Tower 1632 with System V, "make sys3"
  34. # for SCO Xenix/286 2.2.1 with development system 2.2 on 80286, "make sco286"
  35. # for SCO Xenix/286 2.2.1 with development system 2.2 on 8086/8 "make sco86"
  36. # for Sequent Balance 8000, "make bsd"
  37. # for Valid Scaldstar, "make valid"
  38. #
  39. # The result is a runnable program called "wermit" in the current directory.
  40. # After satisfactory testing, you can rename wermit to "kermit" and put it
  41. # where users can find it.
  42. #
  43. # To remove intermediate and object files, "make clean".
  44. # To run lint on the source file, "make lint".
  45. #
  46. ##############################################################################
  47. #
  48. # Notes:
  49. #
  50. #  In many cases, the -O (optimize) compiler switch is omitted.  Feel free
  51. #  to add it if you trust your optimizer.  The ckuus2.c module, in particular,
  52. #  tends to make optimizers blow up.
  53. #
  54. #  "make bsd" should produce a working C-Kermit for 4.1, 4.2, and
  55. #  4.3bsd on VAX, SUN, Pyramid, and other 4.x systems.
  56. #
  57. #  Either "make sys3" or "make sys3nid" tends to produce a working version on
  58. #  any ATT System III or System V R2 or earlier system, including Motorola Four
  59. #  Phase, Callan, Unistar, Cadmus, NCR Tower, HP9836 Series 200, Plexus,
  60. #  Heurikon, etc etc (for exceptions, see below; AT&T 3Bx systems have their
  61. #  own entry).  As far as C-Kermit goes, there is no functional difference
  62. #  between ATT System III and System V R2, so there is no need for a separate
  63. #  "make sys5" entry (but there is one anyway; it merely invokes "make sys3").
  64. #  But for ATT System V R3, use "make sys5r3".  This is different from the
  65. #  above because of the redefinition of signal().
  66. #
  67. #  "make sys3nid" is equivalent to "make sys3" but leaves out the -i option,
  68. #  which is used indicate that separate instruction and data (text) spaces are
  69. #  to be used, as on a PDP-11.  Some systems don't support this option, others
  70. #  may require it.  If one of these options doesn't work on your System III
  71. #  or System V system, try the other.
  72. #
  73. #  For Xenix...  What's Xenix?  There are so many different products & versions
  74. #  sold under this name, the name "xenix" is almost meaningless.  IBM, SCO,
  75. #  Microsoft, etc, IBM Xenix 1.0 =(?) Microsoft Xenix 3.0 = ???  Nevertheless,
  76. #  try "make xenix" for IBM or Microsoft, or "make sco286" or "make sco86" for
  77. #  for SCO Xenix.  If these don't work, try the following modifications to
  78. #  this Makefile:
  79. #    Change "CC= cc" to "CC = cc -LARGE"
  80. #    In the "xenix:" make entry, add "-M2m -UM_I86" to the compiler switches
  81. #    (for the IBM PC family), and "-Mm -lx" to the link switches.
  82. #
  83. #  For Unix Version 7, several variables must be defined to the values
  84. #  associated with your system.  BOOTNAME=/edition7 is the kernel image on
  85. #  okstate's Perkin-Elmer 3230.  Others will probably be /unix.  PROCNAME=proc
  86. #  is the name of the structure assigned to each process on okstate's system.
  87. #  This may be "_proc" or some other variation.  See <sys/proc.h> for more info
  88. #  on your systems name conventions.  NPROCNAME=nproc is the name of a
  89. #  Kernal variable that tells how many "proc" structures there are.  Again
  90. #  this may be different on your system, but nproc will probably be somewhere.
  91. #  The variable NPTYPE is the type of the nproc variable -- int, short, etc.
  92. #  which can probably be gleaned from <sys/param.h>.
  93. #  The definition of DIRECT is a little more complicated.  If nlist() returns,
  94. #  for "proc" only, the address of the array, then you should define DIRECT
  95. #  as it is below.  If however, nlist() returns the address of a pointer to
  96. #  the array, then you should give DIRECT a null definition (DIRECT= ).  The
  97. #  extern declaration in <sys/proc.h> should clarify this for you.  If it
  98. #  is "extern struct proc *proc", then you should NOT define DIRECT.  If it
  99. #  is "extern struct proc proc[]", then you should probably define DIRECT as
  100. #  it is below.  See ckuv7.hlp for further information.
  101. #
  102. #  For 2.9bsd, the makefile may use pcc rather than cc for compiles;
  103. #  that's what the CC and CC2 definitions are for (the current version
  104. #  of the makefile uses cc for both; this was tested and seems to work on
  105. #  the DEC Pro 380).  2.9 support basically follows the 4.1 path.
  106. #  Some 2.9 systems use "dir.h" for the directory header file, others
  107. #  will need to change this to "ndir.h".
  108. #
  109. #  The v7 and 2.9bsd versions assume I&D space on a PDP-11.  When building
  110. #  C-Kermit for v7 on a PDP-11, you should probably add the -i option to
  111. #  the link flags.  Without I&D space, overlays would probably have to be
  112. #  used (or code mapping a`la Pro/Venix if that's available).
  113. #
  114. #  Other systems require some special treatment:
  115. #
  116. #  For Ridge32 (ROS3.2), use "make sys3", but
  117. #  1. Use "CFLAGS = -DUXIII -i -O" "LNKFLAGS = -i"
  118. #  2. Don't #include <sys/file.h> in cku[tf]io.c.
  119. #
  120. #  For Whitechapel MG-1 Genix 1.3, use "make bsd", but
  121. #  1. In ckufio.c, have zkself() return 0 or call getpid, rather than getppid,
  122. #     or simply do "return(kill(0,9))" rather than "return(kill getppid(),1)".
  123. #  2. Wart reportedly can't process ckcpro.w; just work directly from ckcpro.c.
  124. #
  125. #  For Pixel 1000, use "make bsd", do step 1 for Whitechapel MG-1, above.
  126. #
  127. #  For Altos 986 with Xenix 3.0, use "make sys3", but
  128. #  1. Get rid of any "(void)"'s (they're only there for Lint anyway)
  129. #  2. In ckcdeb.h, define CHAR to be "char" rather than "unsigned char".
  130. #
  131. #  For IBM PC/AT and clones running Microport Sys 5.2 Rel.2, change
  132. #  'wait(0)' everywhere to 'wait((int *)0)', and use the -Ml link switch.
  133. #
  134. #  Other systems that are close to, but not quite, like Sys III or V, or
  135. #  4.x BSD or V7 -- look at some of the tricks used below and see if you
  136. #  can find a combination that works for you.
  137. #
  138. ##############################################################################
  139. #
  140. #  V7-specific variables.
  141. #  These are set up for Perkin-Elmer 3230 V7 Unix:
  142. #
  143. PROC=proc
  144. DIRECT=
  145. NPROC=nproc
  146. NPTYPE=int
  147. BOOTFILE=/edition7
  148. #
  149. # ( For TRS-80 Xenix, use PROC=_proc, DIRECT=-DDIRECT, NPROC=_Nproc,
  150. #   NPTYPE=short, BOOTFILE=/xenix )
  151. #
  152. ###########################################################################
  153. #
  154. #  Compile and Link variables:
  155. #
  156. LNKFLAGS=
  157. SHAREDLIB=
  158. CC= cc
  159. CC2= cc
  160. #
  161. ###########################################################################
  162. #
  163. # Dependencies Section:
  164. #
  165. make:
  166.     @echo 'Make what?  You must tell which system to make C-Kermit for.'
  167.  
  168. wermit: ckcmai.o ckucmd.o ckuusr.o ckuus2.o ckuus3.o ckcpro.o ckcfns.o \
  169.          ckcfn2.o ckucon.o ckutio.o ckufio.o ckudia.o ckuscr.o
  170.     $(CC2) $(LNKFLAGS) $(SHAREDLIB) -o wermit ckcmai.o ckutio.o \
  171.          ckufio.o ckcfns.o \
  172.          ckcfn2.o ckcpro.o ckucmd.o ckuus2.o ckuus3.o ckuusr.o \
  173.          ckucon.o ckudia.o ckuscr.o
  174.  
  175. ckcmai.o: ckcmai.c ckcker.h ckcdeb.h ckcsym.h
  176.  
  177. ckuusr.o: ckuusr.c ckucmd.h ckcker.h ckuusr.h ckcdeb.h
  178.  
  179. ckuus2.o: ckuus2.c ckucmd.h ckcker.h ckuusr.h ckcdeb.h
  180.  
  181. ckuus3.o: ckuus3.c ckucmd.h ckcker.h ckuusr.h ckcdeb.h
  182.  
  183. ckucmd.o: ckucmd.c ckucmd.h ckcdeb.h
  184.  
  185. ckcpro.o: ckcpro.c ckcker.h ckcdeb.h
  186.  
  187. ckcpro.c: ckcpro.w wart
  188.     ./wart ckcpro.w ckcpro.c
  189.  
  190. ckcfns.o: ckcfns.c ckcker.h ckcdeb.h ckcsym.h
  191.  
  192. ckcfn2.o: ckcfn2.c ckcker.h ckcdeb.h ckcsym.h
  193.  
  194. ckufio.o: ckufio.c ckcker.h ckcdeb.h
  195.  
  196. ckutio.o: ckutio.c ckcdeb.h
  197.  
  198. ckucon.o: ckucon.c ckcker.h ckcdeb.h
  199.  
  200. wart: ckwart.o
  201.     $(CC) $(LNKFLAGS) -o wart ckwart.o
  202.  
  203. ckwart.o: ckwart.c
  204.  
  205. ckudia.o: ckudia.c ckcker.h ckcdeb.h ckucmd.h
  206.  
  207. ckuscr.o: ckuscr.c ckcker.h ckcdeb.h
  208. #
  209. ###########################################################################
  210. #
  211. # Make commands for specific systems:
  212. #
  213. #
  214. #Berkeley Unix 4.1 or 4.2 (and presumably also 4.3), also Ultrix-32 1.x, 2.0
  215. bsd:
  216.     make wermit "CFLAGS= -DBSD4 -DDEBUG -DTLOG"
  217.  
  218.  
  219. #Berkeley Unix 2.8, 2.9 for PDP-11s with I&D space, maybe also Ultrix-11???
  220. #If you have trouble with this, try removing "-l ndir".  If you still have
  221. #trouble, remove "-DDEBUG -DTLOG".  Or try defining CC and/or CC2 as "pcc"
  222. #instead of "cc".
  223. bsd29:
  224.     make wermit "CFLAGS= -DBSD29 -DDEBUG -DTLOG" \
  225.         "LNKFLAGS= -i -lndir" "CC= cc " "CC2= cc"
  226.  
  227. #Version 7 Unix
  228. v7:
  229.     make wermit "CFLAGS=-DV7 -DDEBUG -DTLOG -DPROCNAME=\\\"$(PROC)\\\" \
  230.     -DBOOTNAME=\\\"$(BOOTFILE)\\\" -DNPROCNAME=\\\"$(NPROC)\\\" \
  231.     -DNPTYPE=$(NPTYPE) $(DIRECT)"
  232.  
  233. #System V R3, some things changed since Sys V R2...
  234. sys5r3:
  235.     make wermit "CFLAGS = -DSVR3 -DUXIII -DDEBUG -DTLOG -i -O" \
  236.         "LNKFLAGS = -i"
  237.  
  238. #In case they type "make sys5"...
  239. sys5:
  240.     make sys3
  241.  
  242. #Generic ATT System III or System V (with I&D space)
  243. sys3:
  244.     make wermit "CFLAGS = -DUXIII -DDEBUG -DTLOG -i -O" \
  245.         "LNKFLAGS = -i"
  246.  
  247. #AT&T 7300 Unix PC
  248. att7300:
  249.     make wermit "CFLAGS = -DUXIII -DATT7300 -DDEBUG -DTLOG -i -O" \
  250.         "LNKFLAGS = -i" \
  251.         "SHAREDLIB = /lib/crt0s.o /lib/shlib.ifile"
  252.  
  253. #Generic ATT System III or System V (no I&D space)
  254. sys3nid:
  255.     make wermit "CFLAGS = -DUXIII -DDEBUG -DTLOG -O" "LNKFLAGS ="
  256.  
  257. #AT&T 3B-series computers running System V
  258. #  Only difference from sys3 is lock file stuff...
  259. att3bx:
  260.     make wermit "CFLAGS = -DUXIII -DATT3BX -DDEBUG -DTLOG -i -O" \
  261.         "LNKFLAGS = -i"
  262.  
  263. #HP 9000 series 300, 500, 800.
  264. hpux:
  265.     make wermit "CFLAGS = -DUXIII -DHPUX -DDEBUG -DTLOG -O" "LNKFLAGS ="
  266.  
  267. #Regulus on CIE Systems 680/20
  268. cie:
  269.     make wermit "CFLAGS = -DUXIII -DCIE -DDEBUG -DTLOG -O" "LNKFLAGS ="
  270.  
  271. #Microsoft "Xenix/286" e.g. for IBM PC/AT
  272. xenix:
  273.     make wermit "CFLAGS= -DXENIX -DUXIII -DDEBUG -DTLOG -F 3000 -i" \
  274.         "LNKFLAGS = -F 3000 -i"
  275.  
  276. #SCO Xenix/286 2.2.1, e.g. for IBM PC/AT, PS/2 Model 50, etc.
  277. sco286:
  278.     make wermit "CFLAGS= -DXENIX -DUXIII -DDEBUG -DTLOG -F 3000 -i -M2le" \
  279.         "LNKFLAGS = -F 3000 -i -M2le"
  280.  
  281. #SCO Xenix 2.2.1 for IBM PC, XT, PS2/30, or other 8088 or 8086 machine
  282. sco86:
  283.     make wermit "CFLAGS= -DXENIX -DUXIII -DDEBUG -DTLOG -F 3000 -i -Mle" \
  284.         "LNKFLAGS = -F 3000 -i -Mle"
  285.  
  286. #PC/IX, Interactive Corp System III for IBM PC/XT
  287. pcix:
  288.     make wermit \
  289.     "CFLAGS= -DPCIX -DUXIII -DISIII -DDEBUG -DTLOG -Dsdata=sdatax -O -i" \
  290.         "LNKFLAGS = -i"
  291.  
  292.  
  293. #Interactive Corp System III port in general --
  294. is3:
  295.     make wermit \
  296.         "CFLAGS = -DISIII -DUXIII -DDEBUG -DTLOG -Ddata=datax -O -i" \
  297.         "LNKFLAGS = -i"
  298.  
  299.  
  300. #Masscomp System III
  301. rtu:
  302.     make wermit "CFLAGS= -UFIONREAD -DUXIII -DDEBUG -DTLOG -O" \
  303.         "LNKFLAGS ="
  304.  
  305. #DEC Pro-3xx with Pro/Venix V1.0 or V1.1
  306. # Requires code-mapping on non-I&D-space 11/23 processor, plus some
  307. # fiddling to get interrupt targets into resident code section.
  308. provx1:
  309.     make wart "CFLAGS= -DPROVX1" "LNKFLAGS= "
  310.     make wermit "CFLAGS = -DPROVX1 -DDEBUG -DTLOG -md780" \
  311.         "LNKFLAGS= -u _sleep -lc -md780"
  312.  
  313. #NCR Tower 1632, OS 1.02
  314. tower1:
  315.     make wermit "CFLAGS= -DDEBUG -DTLOG -DTOWER1"
  316.  
  317. #Fortune 32:16, For:Pro 1.8 (mostly like 4.1bsd)
  318. ft18:
  319.     make wermit "CFLAGS= -DTLOG -DBSD4 -DFT18"
  320.  
  321. #Valid Scaldstar
  322. #Berkeleyish, but need to change some variable names.
  323. valid:
  324.     make wermit "CFLAGS= -DBSD4 -Dcc=ccx -DFREAD=1"
  325.  
  326. #IBM IX/370 on IBM 370 Series mainframes
  327. #Mostly like sys3, but should buffer packets.
  328. ix370:
  329.     make wermit "CFLAGS = -DIX370 -DUXIII -DDEBUG -DTLOG -i -O" \
  330.     "LNKFLAGS = -i"
  331.  
  332. #Amdahl UTS 2.4 on IBM 370 series compatible mainframes.
  333. #Mostly like V7, but can't do initrawq() buffer peeking.
  334. uts24:
  335.     make wermit "CFLAGS=-DV7 -DDEBUG -DTLOG -DPROCNAME=\\\"$(PROC)\\\" \
  336.     -DUTS24 -DBOOTNAME=\\\"$(BOOTFILE)\\\" -DNPROCNAME=\\\"$(NPROC)\\\" \
  337.     -DNPTYPE=$(NPTYPE) $(DIRECT)"
  338.  
  339. #BBN C/70 with IOS 2.0
  340. #Mostly Berkeley-like, but with some ATTisms
  341. c70:
  342.     make wermit "CFLAGS= -DBSD4 -DC70 -DDEBUG -DTLOG"
  343.  
  344. #Zilog ZEUS 3.21
  345. zilog:
  346.     make wermit "CFLAGS = -DUXIII -DZILOG -DTLOG -i -O" "LNKFLAGS = -i"
  347.  
  348. #CDC VX/VE 5.2.1
  349. vxve:
  350.     make wermit "CFLAGS = -DUXIII -DVXVE -i -O" "LNKFLAGS = -i"
  351.  
  352. #Clean up intermediate and object files
  353. clean:
  354.     -rm -f ckcmai.o ckucmd.o ckuusr.o ckuus2.o ckuus3.o ckcpro.o \
  355.     ckcfns.o ckcfn2.o ckucon.o ckutio.o ckufio.o ckudia.o ckuscr.o \
  356.     ckwart.o ckcpro.c
  357.  
  358. #Run Lint on this mess for the BSD version.
  359. lint:
  360.     -lint -x -DBSD4 -DDEBUG -DTLOG ck[cu]*.[hc] > ck.lint.bsd4
  361.  
  362.  
  363.